#pragma once
#include "Listener/MqListener.h"

class CActiveMqWrapper : public CBaseListener
{
public:
	CActiveMqWrapper();
	~CActiveMqWrapper();

	
	bool Init();
	bool Uninit();

	virtual void onException( const cms::CMSException& ex );

	bool SendMqMsg();

private:
	bool CreateTopic();
	bool CreateQueue();

private:
	cms::Connection* m_pConnect;
	cms::Session* m_pSession;

	cms::Destination* m_pServerDestion;
	cms::MessageProducer* m_pServerProducer;

	cms::Destination* m_pClientDestion;
	cms::MessageConsumer* m_pClientConsumer;

	CMqListener m_MqListener;

	std::string m_sMqUrl;
};
